package com.beiji.usercentert.exception;

import com.beiji.usercentert.commoon.ErrorCode;
import lombok.Data;

/**
 * 自定义异常
 * @author beiji
 */
@Data
public class BusinessException extends RuntimeException{
    private ErrorCode errorCode;

    private String description;

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(ErrorCode errorCode, String description) {
        this.errorCode = errorCode;
        this.description = description;
    }

    public BusinessException(ErrorCode errorCode) {
        this.errorCode = errorCode;
    }
}
